<h1 class="site-h1"><?php if (isset($info['title'])):?><?=$info['title']?><?php endif;?></h1>
<blockquote class="layui-elem-quote">
    <p>方法：<span class="title-red">POST</span></p>
    <p>地址：<?=isset(Yii::$app->params['domain']) ? Yii::$app->params['domain'] : \Yii::$app->request->hostInfo?>/api/<?php if (isset($info['route'])):?><?=$info['route']?><?php endif;?></p>
    <br>
<!--    http://api.wechat.com/api/{地址}?appid={$appid}&sign={$sign}&time={$time} -->
    <p>测试地址：<?=Cm::$app->apiUrl($info['route'])?></p>
</blockquote>

<?php if (isset($info['get']) && !empty($info['get']) && is_array($info['get'])):?>
    <div class="site-title">
        <fieldset><legend><a name="other"><span class="title-red">POST</span>参数说明</a></legend></fieldset>
    </div>
    <div class="site-text">
        <div class="layui-form">
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col width="150">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <th>参数</th>
                    <th>是否必填</th>
                    <th>实例</th>
                    <th>说明</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($info['post'] as $item):?>
                    <tr>
                        <td><?=$item['key']?></td>
                        <td><?php if ($item['not_null']):?>是<?php else:?>否<?php endif;?></td>
                        <td><?=$item['value']?></td>
                        <td><?=$item['title']?></td>
                    </tr>
                <?php endforeach;?>

                </tbody>
            </table>
        </div>
    </div>
<?php endif;?>
<?php if (isset($info['post']) && !empty($info['post']) && is_array($info['post'])):?>
    <div class="site-title">
        <fieldset><legend><a name="other"><span class="title-red">POST</span>参数说明</a></legend></fieldset>
    </div>
    <div class="site-text">
        <div class="layui-form">
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col width="150">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <th>参数</th>
                    <th>是否必填</th>
                    <th>实例</th>
                    <th>说明</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($info['post'] as $item):?>
                    <tr>
                        <td><?=$item['key']?></td>
                        <td><?php if ($item['not_null']):?>是<?php else:?>否<?php endif;?></td>
                        <td><?=$item['value']?></td>
                        <td><?=$item['title']?></td>
                    </tr>
                <?php endforeach;?>

                </tbody>
            </table>
        </div>
    </div>
<?php endif;?>

<?php if (isset($info['post_remark']) && !empty($info['post_remark']) && is_array($info['post_remark'])):?>
    <?php foreach ($info['post_remark'] as $k=>$row):?>
        <div class="site-title">
            <fieldset><legend><a name="other">参数[<span class="title-argc"><?=$k?></span>]说明</a></legend></fieldset>
        </div>
        <div class="site-text">
            <blockquote class="layui-elem-quote json-view">
                <div class="json-hide" style="display: none"><?=$row?></div>
                <pre class="json-show"></pre>
            </blockquote>
        </div>
    <?php endforeach;?>
<?php endif;?>

